Block Diagrams as a Syntactic Extension to Haskell
نویسندگان
چکیده
Often, the semantics of languages are defined by the products that support their usage. The semantics are then determined by the source code of those products, which often is a general-purpose programming language. This may lead to complications in defining a clean semantics, for example because imperative notions slip into a declarative language. It is illustrated how block diagrams can be translated into Haskell to define the semantics of a graphical language in terms of a textual programming language. This also allows the use of block diagrams as a syntactic extension to Haskell and the use of Haskell as an action language in block diagrams. Imperative notions can then be included from the declarative perspective of Haskell, which is more constrained and less prone to resulting in complicated semantics of interaction and combination of the imperative and declarative.
منابع مشابه
Generic Monadic Constructs for Embedded Languages
We present a library of generic monadic constructs for embedded languages. It is an extension of Syntactic, a Haskell library for defining and processing generic abstract syntax. Until now, Syntactic has been mostly suited to implement languages based on pure, side effect free, expressions. The presented extension allows the pure expressions to also contain controlled side effects, enabling the...
متن کاملType Reconstruction for Type Classes
We study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of ML-style polymorphism with overloading. We generalize Milner’s work on polymorphism by introducing a separate context constraining the type variables in a typing judgement. This leads to simple type inference systems and algorithms which closely ...
متن کاملType Reconstruction for Type Classes Tu Mm Unchen 4
We study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of ML-style polymorphism with overloading. We generalize Milner's work on polymorphism by introducing a separate context constraining the type variables in a typing judgement. This leads to simple type inference systems and algorithms which closely ...
متن کاملA Simple Semantics for Polymorphic Recursion
Polymorphic recursion is a useful extension of HindleyMilner typing and has been incorporated in the functional programming language Haskell. It allows the expression of efficient algorithms that take advantage of non-uniform data structures and provides key support for generic programming. However, polymorphic recursion is, perhaps, not as broadly understood as it could be and this, in part, m...
متن کاملAn OCL Extension for Real-Time Constraints
The Object Constraint Language (OCL) was introduced to support the specification of constraints for UML diagrams and is mainly used to formulate invariants and operation preand postconditions. Though OCL is also applied in behavioral diagrams, e.g., as guards for state transitions, it is currently not possible to specify constraints concerning the dynamic behavior and timing properties of such ...
متن کامل